
		<!--头部 end-->
		<div class="conter">
			<div class="middle">
				<div class="mid-contre">
					<h2>当前位置：<a href="index.html">首页</a>>我的购物车</h2>
					<div class="top">
						<ul>
							<li class="default">我的购物车</li>
							<li>确认订单</li>
							<li>提交订单</li>
						</ul>
					</div>
					<div class="shop_cart">
						<div class="shop-title">
							<div class="left">
								<ul>
									<li class="on">全部商品</li>
									<li>猜你喜欢</li>
								</ul>	
							</div>
							<div class="right">
								<label>配送至：</label>
								<select>
									<option>成都市高新区</option>
									<option>成都市高新区</option>
								</select>
							</div>
						</div>
						<div class="shop_box">
							<ul>
								<li>
									<table>
										<thead>
											<tr>
												<th>
													<label>
														<input type="checkbox" />
														全选
													</label>
												</th>
												<th>商品</th>
												<th>商品属性</th>
												<th>单价（元）</th>
												<th>数量</th>
												<th>小计（元）</th>
												<th>操作</th>
											</tr>
										</thead>
										<tbody id="tbody">
											<volist name="goo_cart" id="cart">
												<tr>

													<td class="shop_img">

														<label><input type="checkbox" value="1" /></label>
														<a href="pro_details.html"><img src="__PUBLIC__/Home/Images/order_00.jpg"></a>
													</td>
													<td class="shop_title"><span><a href="{:U('goo_details',array('pro_id'=>$cart['pro_id']))}">{$cart.pro_name}</a></span></td>
													<td class="shop_color"><span id="color">【{$cart.color_name}色】{$cart.catename}</span></td>
													<td class="univalence">
														<span class="cost">{$cart.price}</span>
														<button id="Sales">特价产品</button>
													</td>
													<td class="shop_num">
														<div class="num">
															<input hidden="" class="cart_id" value="{$cart.cart_id}">
															<button type="button" class="prd_subNum" id="reduceb"  onclick="">-</button>
															<input type="text" id="prd_numb" value="{$cart.number}" class="prd_num">
															
															<button type="button" class="prd_addNum" id="addb" onclick="">+</button>
												        </div>
													</td>
													<td class="shop_price"><span class="total">{$cart['price']*$cart['number']}</span></td>
													<td class="shop_handle">
														<input hidden="" class="cart_id" value="{$cart.cart_id}">
														<span class="delete" id="remove">删除</span>
														<span class="attention">添加关注</span>
													</td>
												</tr>
												
												
											</volist>
											
										</tbody>
									</table>	
								</li>
							</ul>
							
							<ul style="display: none;">
								<li class="like"><a>猜你喜欢</a></li>
							</ul>
						</div>
						
						<div class="shop-bot">
							<ul>
								<li>
									<label>
										<input type="checkbox" />
										全选
									</label>
								</li>
								<li class="delete">
									<span id="allremove">删除选中商品</span>
								</li>
								<li class="attention">
									<span>添加到关注</span>
								</li>
								<li class="eliminate">
									<span>清除下柜商品</span>
								</li>
								<li>
									<span>已选择<i>1</i>件商品</span>
								</li>
								<li>
									<span>总价：￥<i>368</i>元</span>
									<span>已节省：￥<a>0</a>元</span>
								</li>
								
								<li>
									<a href="{:U('Pay/confirm_order')}" id="result"><button>结算</button></a>
								</li>
							</ul>
						</div>
					</div>
				</div>
				<!--mid-contre-->
			</div>
			<!--middle-->
		</div>
		<script type="text/javascript">
			$('.delete').click(function(){
				var cart_id = $(this).prev().val();
				layer.confirm('确定要删除吗',function(index){
					$.post('',{cart_id:cart_id,status:2},function(data){
						if(data.code == 0){
							layer.alert(data.info);
						}else{
							layer.alert(data.info,{end:function(){
								window.location.reload();
							}});
						}
					})
				})
				
			})

			$("#result").click(function(){
				// alert(11);return false;
				// var len1 = $(".shop_box tbody>tr>td input[type=checkbox]").length;
				var i = 0;
				var arr = '';
				$("#tbody>tr").each(function(){
					// alert(11);return false;
					var check = $(this).children().find('input[type=checkbox]').attr('checked');
					var cart_id = $(this).children().eq(4).find('.cart_id').val();
					if(check){
						if(arr == ''){

							
							arr = cart_id;
						}else{

							arr += ','+cart_id ;
						}
						
					}
					

					
				})

				if(arr == ''){
					
					layer.alert('至少选择一项商品');return false;
				}else{
					$.post("",{arr:arr,status:3,way:'cart'},function(data){

					});
				}
				
				// alert(arr);
				
			})
		</script>
		

